@extends('layouts.admin')
@section('style')
@endsection
@section('content')
    <div class="layui-container openframe">
        <form method="post" action="{{ url('account') }}" id="VoForm" class="layui-form" novalidate="1">
            {{ csrf_field() }}
            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>旺旺号</label>
                <div class="layui-input-block">
                    <input type="text" data-title="旺旺号" value="" name="account_no" id="account_no" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>拉黑原因</label>
                <div class="layui-input-block">
                    <textarea name="comm" class="layui-textarea"></textarea>
                </div>
            </div>
        </form>
    </div>
@endsection
@section('script')
    <script type="text/javascript">
        var doSubmit = null;
        layui.use(['form', 'element', 'layer', 'utils', 'formField'], function () {
            var form = layui.form;
            var element = layui.element;
            var URL = layui.utils.URL;
            var $ = layui.$;
            doSubmit = function(callback){
                var url = $("#VoForm").prop('action');
                var data = $("#VoForm").serialize();
                URL.post(url, data, {
                    dataType: 'json',
                    success: function (res) {
                        if (res.code == 1) {
                            layer.msg(res.message, {icon: 6, times: 2000}, function () {
                                callback();
                            })
                        } else {
                            layer.msg(res.message, {icon: 5, times: 2000});
                        }
                    }
                })
                return false;
            }
        });

    </script>
@endsection